# Maintainer: Angel Velasquez <angvp@archlinux.org>
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-astroid
pkgver=2.0.4
pkgrel=1
pkgdesc="Useful miscellaneous modules used by Logilab projects"
arch=('any')
url="https://github.com/PyCQA/astroid"
license=('LGPL')
depends=('python-six' 'python-lazy-object-proxy' 'python-wrapt')
makedepends=('python-setuptools')
checkdepends=('python-dateutil' 'python-pytest' 'python-numpy' 'python-nose')
replaces=('python-logilab-astng')
conflicts=('python-logilab-astng')
source=(https://github.com/PyCQA/astroid/archive/astroid-$pkgver.tar.gz)
sha512sums=('1d52430a821b53ec0f40cee4ab600a290d4c0371d348b969edded88c6ec3f8c5f0887f271e0f7eff298c0de13505a1137c5d233b6fdc2029b2eebe582d02c617')

build() {
  cd "$srcdir"/astroid-astroid-$pkgver
  python setup.py build
}

check() {
  cd "$srcdir"/astroid-astroid-$pkgver
  pytest
}

package() {
  cd "$srcdir"/astroid-astroid-$pkgver
  python setup.py install --optimize=1 --skip-build --prefix=/usr --root="$pkgdir"
}
